package view;

import tool.TSUtility;

public class BaseView {


    public static final String ANSI_RESET = "\u001B[0m";
    public static final String ANSI_GREEN = "\u001B[32m";
    public static final String ANSI_YELLOW = "\u001B[33m";
    public static final String ANSI_PURPLE = "\u001B[35m";
    public static final String ANSI_BLUE = "\u001B[34m";
    public static final String ANSI_CYAN = "\u001B[36m";

    public static  void baseMenu() throws Exception {
        System.out.println(ANSI_BLUE);
        ReaderTypeView readerTypeView = new ReaderTypeView();
        BookTypeView bookTypeView = new BookTypeView();
        while (true) {
            System.out.print(ANSI_RESET + ANSI_GREEN);
            System.out.println("🔣-------~读者信息管理菜单~---------🔣");
            System.out.println("🐕-------<1.读者类型管理>------*");
            System.out.println("🐖-------<2.图书类型管理>------*");
            System.out.println("🐱-------<3.罚金类型管理>------*");
            System.out.println("🐱-------<4.退出>------*");

            char c = TSUtility.readMenuSelection();
            switch (c) {
                case '1':
                    readerTypeView.readerTypeMenu();
                    break;
                case '2':
                    bookTypeView.bookTypeMenu();
                    break;
                case '3':
                    FineView.fineMenu();
                    break;
                case '4':
                    return;
            }
        }








    }
}
